import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import sass from 'sass'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
      react(),
      ["import", { "libraryName": "antd", "style": true }]
  ],
  server: {
    proxy: {
      '/api': {
        // target: 'https://dlnew.lj666.cn',
        target: 'https://dpvue1.huawnh.cn',
        changeOrigin: true,
        ws: true,
        rewrite: (path) => path.replace(new RegExp('/api'), '/api'),
        // only https
        // secure: false
      },
    },
  },
  buildOptions: {
    scss: {
      implementation: sass
    }
  }
})
